package com.atguigu.srb.core.controller.admin;

import com.atguigu.common.result.R;
import com.atguigu.srb.core.pojo.entity.LendReturn;
import com.atguigu.srb.core.service.LendReturnService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author: Bright
 * @Date: 2022-04-28 17:02
 * @Description: com.atguigu.srb.core.controller.admin
 * @version: 1.0
 */
@Slf4j
@RestController
@Api(tags = "还款计划")
@RequestMapping("/admin/core/lendReturn")
public class AdminLendReturnController {
    @Resource
    LendReturnService lendReturnService;


    @ApiOperation(value = "得到还款计划列表")
    @GetMapping("/list/{lendId}")
    public R list(
            @ApiParam(value = "标的id",required = true)
            @PathVariable Long lendId){

        return R.ok().data("list",lendReturnService.listByLendId(lendId));
    }


}
